<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="../org/angular.min.js"></script>
    <style>
        .red {
            background: red;
        }

        .font {
            font-size: 100px;
        }

        .lock {
            background: slategrey;
        }
        .age_red{
            color: red;
        }
    </style>
</head>
<body>
<div ng-app="hd" ng-controller="ctrl">

    <div ng-class="{red:false, font:true}">hdphp</div>

    <table border="1" width="700">
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>年龄</td>
        </tr>
        <tr ng-repeat="k in data" ng-class="{lock:k.status==0}">
            <td>{{k.id}}</td>
            <td ng-class="{age_red:k.age>12}">{{k.name}}</td>
            <td>{{k.age}}</td>
        </tr>
    </table>
</div>


<script>
    var m = angular.module('hd', []);
    m.controller('ctrl', ['$scope', function ($scope) {
        $scope.data = [
            {id: 1, name: '小米', age: 11, status: 1},
            {id: 1, name: '小麦', age: 12, status: 0},
            {id: 1, name: '小明', age: 10, status: 0},
            {id: 1, name: '小李', age: 15, status: 1},
            {id: 1, name: '李明', age: 12, status: 0},
            {id: 1, name: 'lili', age: 13, status: 1},
        ];
    }]);
</script>

</body>
</html>

